<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:63:"E:\WWW\movie.cc\public/../application/index\view\index\reg.html";i:1682299919;}*/ ?>
<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>注册表单 ‹ <?php echo $config['webname']; ?> — WordPress</title>
		<meta name="robots" content="max-image-preview:large, noindex, noarchive">
		<script type="text/javascript" src="/static/index/js/jquery.js" id="jquery-js"></script>
		
		<link rel="stylesheet" id="dashicons-css" href="/static/index/css/dashicons.min.css" type="text/css" media="all">
		<link rel="stylesheet" id="buttons-css" href="/static/index/css/buttons.min.css" type="text/css" media="all">
		<link rel="stylesheet" id="forms-css" href="/static/index/css/forms.min.css" type="text/css" media="all">
		<link rel="stylesheet" id="l10n-css" href="/static/index/css/l10n.min.css" type="text/css" media="all">
		<link rel="stylesheet" id="login-css" href="/static/index/css/login.min.css" type="text/css" media="all">
		<style id="login-inline-css" type="text/css">
			.login .message, .login #login_error{margin-bottom: 0;}
			.code_wrap label:last-child{display:flex;}
			.code_wrap input.button{margin-bottom:10px;}
			.login form .input, .login input[type=password], .login input[type=text]{font-size:20px; margin-bottom:10px;}
			p.login-types,p.bind-types{line-height:2; float:left; clear:left; margin-top:10px;}
			p.login-types a,p.bind-types a{text-decoration: none; display:block;}
			div.login-fields, div.bind-fields{margin-bottom:10px;}
		</style>
		<link rel="stylesheet" tyssspe="text/css" href="/static/index/css/icon.css">
		<meta name="referrer" content="strict-origin-when-cross-origin">
		<meta name="viewport" content="width=device-width">
	</head>
	<body class="login js login-action-register wp-core-ui  locale-zh-cn">
		
		<div id="login">
			<h1>
				<a href="/"><?php echo $config['webname']; ?></a>
			</h1>
			<p class="message register">注册为本站点用户</p>
			<form name="registerform" id="registerform" action="#" onsubmit="return false;" method="post" novalidate="novalidate">
				<p>
					<label for="user_login">用户名</label>
					<input type="text" name="user_login" required id="user_login" class="input" size="20" autocapitalize="none" autocomplete="username">
				</p>
				<p>
					<label for="user_email">电子邮箱地址</label>
					<input type="email" name="user_email" required id="user_email" class="input" size="25" autocomplete="email">
				</p>
				<p>
					<label>密码(至少6位)
						<br>
						<input id="user_pwd1" class="input" required type="password" size="25" value="" name="user_pass">
					</label>
				</p>
				<p>
					<label>重复密码
						<br>
						<input id="user_pwd2" class="input" required type="password" size="25" value="" name="user_pass2">
					</label>
				</p>
				<input type="hidden" name="spam_check" value="1bd8108d00e2a675a1321c3e45fec0db">
				<p>
					<label for="math" class="small">验证码：<?php echo $num1; ?> + <?php echo $num2; ?> = ? (输入算式结果)</label>
					<input type="text" name="sum" id="he" required class="input" size="25">
				<!-- 	<input type="hidden" name="num1" value="5">
					<input type="hidden" name="num2" value="3"> -->
				</p>
				<p id="reg_passmail">
				</p>
				<br class="clear">
				<input type="hidden" name="redirect_to" value="">
				<p class="submit">
					<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="注册">
				</p>
			</form>
			<script src="/static/component/layui/layui.js"></script>
            <script type="text/javascript">
            	$("#registerform").submit(function(){
            		var username=$("#user_login").val();
            		var email=$("#user_email").val();
            		var password=$("#user_pwd1").val();
            		var repass=$("#user_pwd2").val();
            		var he1='<?php echo $he; ?>';
            		var he=$("#he").val();
            		if(!username){
            			layer.msg('请填写用户名', {
		                      offset: '15px'
		                      ,icon: 2
		                      ,time: 2000
		                    });
            			return;
            		}
            		if(!email){
            			layer.msg('请填写邮箱地址', {
		                      offset: '15px'
		                      ,icon: 2
		                      ,time: 2000
		                    });
            			return;
            		}
            		if(!password){
            			layer.msg('请填写密码', {
		                      offset: '15px'
		                      ,icon: 2
		                      ,time: 2000
		                    });
            			return;
            		}
            		if(!repass){
            			layer.msg('请填写重复密码', {
		                      offset: '15px'
		                      ,icon: 2
		                      ,time: 2000
		                    });
            			return;
            		}
            		if(he1!=he){
            			layer.msg('验证码错误', {
		                      offset: '15px'
		                      ,icon: 2
		                      ,time: 2000
		                    });
            			return;
            		}
                    $.ajax({
		               url: 'do_reg.html',
		               data:{username:username,email:email,repass:repass,password:password},
		               type:'POST',
		               success: function(res){
		                console.log(res)
		                if(res.code==1){
		                 layer.msg(res.msg, {
		                      offset: '15px'
		                      ,icon: 1
		                      ,time: 1000
		                    },function(){
		                    	location.replace('/');
		                    });
		                  
		                }else{
		                  layer.msg(res.msg, {
		                      offset: '15px'
		                      ,icon: 2
		                      ,time: 1000
		                    });
		                }
		               }
		            });
                })
            </script>
			<p id="nav">
				<a href="login.html">已有账号,去登录</a>
				| <a href="password.html">忘记密码？</a>
			</p>
			<p id="backtoblog"  style="display: none;">
				<a href="/">← 返回到<?php echo $config['webname']; ?></a>
			</p>
		</div>
		<div class="language-switcher"  style="display: none;">
			<form id="language-switcher" action="" method="get">

				<label for="language-switcher-locales">
					<span class="dashicons dashicons-translation" aria-hidden="true"></span>
					<span class="screen-reader-text">语言</span>
				</label>

				<select name="wp_lang" id="language-switcher-locales">
					<option value="en_US" data-installed="1" lang="en">English (United States)</option>
					<option value="zh_CN" selected="selected" data-installed="1" lang="zh">简体中文</option>
				</select>


				<input type="hidden" name="action" value="register">

				<input type="submit" class="button" value="更改">

			</form>
		</div>
		<script type="text/javascript">
			try{document.getElementById('user_login').focus();}catch(e){}
					if(typeof wpOnload==='function')wpOnload();
		</script>
		<div class="clear"></div>


	</body>
</html>